 package com.book.entity;

import java.sql.Date;

import com.github.drinkjava2.jdialects.annotation.jdia.CreateTimestamp;
import com.github.drinkjava2.jdialects.annotation.jdia.UpdateTimestamp;
import com.github.drinkjava2.jdialects.annotation.jpa.Column;
import com.github.drinkjava2.jdialects.annotation.jpa.Id;
import com.github.drinkjava2.jdialects.annotation.jpa.Table;
import com.github.drinkjava2.jsqlbox.ActiveRecord;

import lombok.ToString;


@ToString
@Table(name="teacher")
public class Teacher extends ActiveRecord<Teacher> {

	public static final String TABLE_NAME = "teacher";

	public static final String ID = "id";


	public static final String USERNAME = "username";

	public static final String PASSWORD = "password";

	public static final String TYPE = "type";

	public static final String SEX = "sex";

	public static final String AMAIL = "amail";

	public static final String PHONE = "phone";

	public static final String NICHENG = "nicheng";

	public static final String CREATE_TIME = "create_time";

	public static final String UPDATE_TIME = "update_time";



	@Id
	private Integer id;






	@Column(name="username", length=1020)
	private String username;

	@Column(name="password", length=1020)
	private String password;
	
	
	@Column(name="img_url", length=255)
	private String imgUrl;

	@Column(name="type", length=1020)
	
	
	
	
	private String type ;

	private Integer sex = 1;
	
	
	

	@Column(name="amail", length=1020)
	private String amail;

	@Column(name="phone", length=1020)
	private String phone;

	@Column(name="nicheng", length=1020)
	private String nicheng;
	
	@CreateTimestamp
	@Column(name="create_time")
	private Date createTime;
	
	@UpdateTimestamp
	@Column(name="update_time")
	private Date updateTime;
     	
	



	public Integer getId(){
		return id;
	}

	public Teacher setId(Integer id){
		this.id=id;
		return this;
	}



	public String getUsername(){
		return username;
	}

	public Teacher setUsername(String username){
		this.username=username;
		return this;
	}

	public String getPassword(){
		return password;
	}

	public Teacher setPassword(String password){
		this.password=password;
		return this;
	}

	public String getType(){
		return type;
	}

	public Teacher setType(String type){
		this.type=type;
		return this;
	}

	public Integer getSex(){
		return sex;
	}

	public Teacher setSex(Integer sex){
		this.sex=sex;
		return this;
	}

	public String getAmail(){
		return amail;
	}

	public Teacher setAmail(String amail){
		this.amail=amail;
		return this;
	}

	public String getPhone(){
		return phone;
	}

	public Teacher setPhone(String phone){
		this.phone=phone;
		return this;
	}

	public String getNicheng(){
		return nicheng;
	}

	public Teacher setNicheng(String nicheng){
		this.nicheng=nicheng;
		return this;
	}

	public Date getCreateTime(){
		return createTime;
	}

	public Teacher setCreateTime(Date createTime){
		this.createTime=createTime;
		return this;
	}

	public Date getUpdateTime(){
		return updateTime;
	}

	public Teacher setUpdateTime(Date updateTime){
		this.updateTime=updateTime;
		return this;
	}

	public String getImgUrl() {
		return imgUrl;
	}

	public Teacher setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
		return this;
	}

	public Teacher(String username, String password) {
		super();
		this.username = username;
		this.password = password;
	}

	public Teacher() {
		super();
	}
	

}
